package com.xyazm.order.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xyazm.common.dao.BaseDAO;
import com.xyazm.order.domain.entity.OrderAmountDetailDO;
import com.xyazm.order.mapper.OrderAmountDetailMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 订单价格明细表
 * @author xuyou
 * 2022/5/14 0014 22:51
*/
@Repository
public class OrderAmountDetailDAO extends BaseDAO<OrderAmountDetailMapper, OrderAmountDetailDO> {

    /**
     * 根据订单号查询订单费用明细
     * @param orderId
     * @return
     */
    public List<OrderAmountDetailDO> listByOrderId(String orderId) {
        LambdaQueryWrapper<OrderAmountDetailDO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(OrderAmountDetailDO::getOrderId,orderId);
        return list(queryWrapper);
    }
}
